DROP TABLE IF EXISTS jms_dwd.dwd_order_detail_dt;
CREATE EXTERNAL TABLE jms_dwd.dwd_order_detail_dt(
         input_time                    timestamp  comment  '录入时间'
         ,input_date                   string     comment  '录入日期'
         ,order_id                     string     comment  '订单号'
         ,waybill_no                   string     comment  '运单号'
         ,order_source_code            string     comment  '订单来源code'
         ,order_source_name            string     comment  '订单来源名称'
         ,pick_network_code            string     comment  '寄件网点code'
         ,pick_network_name            string     comment  '寄件网点名称'
         ,pick_franchisee_code         string     comment  '寄件加盟商code'
         ,pick_franchisee_name         string     comment  '寄件加盟商名称'
         ,pick_agent_code              string     comment  '寄件代理区code'
         ,pick_agent_name              string     comment  '寄件代理区名称'
         ,sender_province_id           bigint     comment  '寄件省份id'
         ,sender_province_name         string     comment  '寄件省份'
         ,sender_city_id               bigint     comment  '寄件城市id'
         ,sender_city_name             string     comment  '寄件城市名称'
         ,sender_area_id               bigint     comment  '寄件区县id'
         ,sender_area_name             string     comment  '寄件区县名称'
         ,dispatch_network_code        string     comment  '派件网点编码'
         ,dispatch_network_name        string     comment  '派件网点名称'
         ,dispatch_franchisee_code     string     comment  '派件加盟商名称'
         ,dispatch_franchisee_name     string     comment  '派件加盟商名称'
         ,dispatch_agent_code          string     comment  '派件代理区code'
         ,dispatch_agent_name          string     comment  '派件代理区名称'
         ,receiver_province_id         bigint     comment  '派件省份id'
         ,receiver_province_name       string     comment  '派件省份'
         ,receiver_city_id             bigint     comment  '派件城市id'
         ,receiver_city_name           string     comment  '派件城市名称'
         ,receiver_area_id             bigint     comment  '派件区县id'
         ,receiver_area_name           string     comment  '派件区县名称'
         ,is_delete                    tinyint    comment  '是否删除1未删除,2已删除'
         ,order_status_code            bigint     comment  '是否取消:104为取消'
 )
 COMMENT '订单综合统计明细表'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_dwd.db/external/dwd_order_detail_dt'
 TBLPROPERTIES (
 'parquet.column.index.access'='true'
 );